<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        let name = '小李';
        let age = 20;
        let sex= "未知"


        // let obj = {
        //     name:name,
        //     age:age,
        //     sex:sex
        // }

        function fn(){
            console.log("这是一个函数");
        }

        let obj = {
            name,
            age,
            sex,
            fn
        }

        console.log(obj);

        obj.fn()

    </script>
</body>
</html>